<template>
  <div class="header">
    <div class="header-left">
      <div class="iconfont">&#xe668;</div>
    </div>
    <div class="header-input"><span class="iconfont">&#xe602;</span>输入城市/游玩/主题</div>
    <router-link to="/city">
      <div class="header-right">
        {{this.city}}
        <span class="iconfont">&#xe603;</span>
      </div>
    </router-link>

  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'HomeHeader',
  computed: {
    ...mapState(['city'])
  }
}
</script>

<style lang="stylus" scoped>
  @import "~styles/varibles.styl"
  .header
    display: flex
    line-height: .86rem
    background: $bgColor
    color: #fff
    .header-left
      height: .64rem
      float:left
      .back-icon
        text-align: center
        font-size: .3rem
    .header-input
      flex: 1
      margin-top .12rem
      height: .64rem
      line-height: .64rem
      margin-left: .2rem
      margin-right: .2rem
      background: #fff
      -webkit-border-radius: .1rem
      -moz-border-radius: .1rem
      border-radius: .1rem
      color: #ccc
    .header-right
      min-width:1.04rem
      padding: 0px .1rem
      float:right
      text-align center
      color #fff
      .arrow-icon
        text-align: center
        font-size: .24rem
</style>
